//
//  RSAUtil.h
//  X_Project_iOS
//
//  Created by 赵梁 on 16/1/15.
//  Copyright © 2016年 zhaoliang. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface RSAUtil : NSObject

+ (SecKeyRef)getPublicKey;

+ (SecKeyRef)createSecKeyWithPubilcKeyData:(NSData *)publicKeyData;
+ (SecKeyRef)createSecKeyWithPubilcKeyString:(NSString *)publicKeyBase64String;
+ (SecKeyRef)createSecKeyWithPubilcKeyPath:(NSString *)publicKeyPath;

+ (NSString*)RSAEncodeString:(NSString*)string withKeyString:(NSString *)keyString;
+ (NSData*)RSAEncodeData:(NSData*)content withKeyString:(NSString *)keyString;
+ (NSData*)RSAEncodeData:(NSData*)content withKey:(SecKeyRef)key;

@end
